from .utils import *
class Metric(object):
    def __init__(self) -> None:
        pass
    
    def precision(self, y_true, y_pred):
        return precision_score(y_true, y_pred, average="weighted")

    def recall(self, y_true, y_pred):
        return recall_score(y_true, y_pred, average="weighted")

    def auc(self, y_true, y_pred):
        return auc_score(y_true, y_pred)

    def acc(self, y_true, y_pred):
        return accuracy_score(y_true, y_pred)

    def log_loss(self, y_true, y_pred):
        return log_loss(y_true, y_pred, eps=1e-7)

    def gauc(self, y_true, y_pred, users, weights=None):
        return gauc_score(y_true, y_pred, users, weights=weights)
    
    def ndcg(self):
        pass

    def hit(self):
        pass

    def mrr(self):
        pass

    # def recall(self):
    #     pass

